#include <stdlib.h>

typedef struct Node {
    int data;
    struct Node *next;
} Node;

void func() {
    Node *head = NULL;
    Node *n;

    n = malloc(sizeof(Node));
    n->data = 1;
    n->next = head;
    head = n;

    n = malloc(sizeof(Node));
    n->data = 2;
    n->next = head;
    head = n;

    free(head);
}
